<!DOCTYPE html>

<html>
 <head>
 <title>Notification Example</title>
 <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
 <script src="js/jquery.js"></script>
 <script type="text/javascript" charset="utf-8">    
 	// Wait for device API libraries to load    //  
  document.addEventListener("deviceready", onDeviceReady, false);    // device APIs are available    //  
  function onDeviceReady() {
	  $(".isReady").css("display","block");
	         }// Empty
  // Show a custom alert    //   
  function showAlert() {        
	 	var now                  = new Date().getTime(),
    	_60_seconds_from_now = new Date(now + 10*1000);
		try{
		window.plugin.notification.local.add({
   	 		id:      1,
  		  title:   'Reminder',
    	message: 'Dont forget to buy some flowers.',
   		 date:    _60_seconds_from_now
		});
		}
		catch(e){
			alert(e);
		}
	}    
  // Beep three times    //    
  function test() {        
  	alert(window.plugin.notification);
      }

	
 </script>
 <style>
 .isReady{
	 display:none;
 }
 </style>
 </head>

 <body>
<p><a href="#" onclick="showAlert(); return false;">Show Alert</a></p>
<p><a href="#" onclick="test(); return false;">Show Alert</a></p>
<p class="event received" onclick="window.plugin.notification.local.add({ message: 'Great app!' });">Device is Ready</p>
<script type="text/javascript" src="js/deviceReady.js"></script>
<script type="text/javascript" src="local-notification.js"></script>
</body>
</html>